home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / AppleScript / Development Tools / Sample Code / Scripting Additions / Play Sound / PlaySnd.r < prev   
Encoding:
Text File  |  1993-12-15  |  2.4 KB  |  128 lines  |  [TEXT/MPS ]

  1. /**********************************************
  2.     
  3.     Resource file for PlaySnd.c
  4.     Copyright ®1993 Apple Computer Inc.
  5.     All rights reserved
  6.     Written by Donald Olson
  7.  
  8. ***********************************************/ 
  9.  
  10. #include "Types.r"
  11. #include "SysTypes.r"
  12. #include "AEUserTermTypes.r"
  13.  
  14. /* Our version 1 and 2 resources */
  15. resource 'vers' (1) {
  16.     0x1,
  17.     0x0,
  18.     final,
  19.     0x0,
  20.     verUS,
  21.     "1.0",
  22.     "1.0, Copyright ® 1993 Apple Comput"
  23.     "er, Inc. All rights reserved."
  24. };
  25.  
  26. resource 'vers' (2) {
  27.     0x1,
  28.     0x0,
  29.     final,
  30.     0x0,
  31.     verUS,
  32.     "1.0",
  33.     "(by Donald Olson)"
  34. };
  35.  
  36. /* 
  37.     This string is used when the user double clicks on an OSAX
  38.     file. Since it contains nothing that can be opened or 
  39.     printed, the user gets this in a dialog (thanks to the
  40.     System for making this happen).
  41. */
  42.  
  43. resource 'STR ' (-16397) {
  44.     "This document can not be opened or printed."
  45.     " It extends the functionality of AppleScript™"
  46.     "and should be placed in the Scripting Additions"
  47.     "folder found in the Extensions folder of your"
  48.     " System Folder."
  49. };
  50.  
  51. /*
  52.     Our 'aete' resource. It's here that we describe to 
  53.     AppleScript the syntax of our OSAX. Notice that the
  54.     comment field contain information about the event and
  55.     it's parameters. These comments will be displayed by
  56.     Toy Surprise if the user selects this OSAX in the 
  57.     terminology browser invoked when the user chooses the 
  58.     Open Dictionary… menu.
  59. */
  60.  
  61. resource 'aete' (0, "Play Sound OSAX") {
  62.     0x0,
  63.     -0x70,
  64.     english,
  65.     roman,
  66.     {    /* array Suites: 1 elements */
  67.         /* [1] */
  68.         "System Object Suite",
  69.         "",
  70.         'syso',
  71.         1,
  72.         1,
  73.         {    /* array Events: 1 elements */
  74.             /* [1] */
  75.             "play sound",
  76.             " This is the syntax for invoking this OSAX from"
  77.             " AppleScript™.",
  78.             'aevt',
  79.             'plsn',
  80.             noReply,
  81.             "The reply is not required",
  82.             replyOptional,
  83.             singleItem,
  84.             notEnumerated,
  85.             reserved,
  86.             reserved,
  87.             reserved,
  88.             reserved,
  89.             reserved,
  90.             reserved,
  91.             reserved,
  92.             reserved,
  93.             reserved,
  94.             reserved,
  95.             reserved,
  96.             reserved,
  97.             reserved,
  98.             '****',
  99.             "id or name of 'snd ' resource to play"
  100.             " or  path to a sound file",
  101.             directParamRequired,
  102.             singleItem,
  103.             notEnumerated,
  104.             doesntChangeState,
  105.             reserved,
  106.             reserved,
  107.             reserved,
  108.             reserved,
  109.             reserved,
  110.             reserved,
  111.             reserved,
  112.             reserved,
  113.             reserved,
  114.             reserved,
  115.             reserved,
  116.             reserved,
  117.             {    /* array OtherParams: 0 elements */
  118.             }
  119.         },
  120.         {    /* array Classes: 0 elements */
  121.         },
  122.         {    /* array ComparisonOps: 0 elements */
  123.         },
  124.         {    /* array Enumerations: 0 elements */
  125.         }
  126.     }
  127. };
  128.